<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 编写函数map(arr) 把数组中的每一位数字都增加30%，并返回一个新数组
        function map(arr){
            var sum = 0;
            var newarr = [];
            for(var i = 0;i<arr.length;i++){
                sum = parseFloat(arr[i]*1.3).toFixed(1)
                newarr[i] = sum
            }
            return newarr
            // document.write(newarr)
        }
        var arr = [6,7,8,9];
        var res = map(arr)
        document.write(res)
    </script>
</head>

<body>

</body>

</html>